package com.nhjf.model.payMessage;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

import com.nhjf.model.BaseModel;
import com.nhjf.model.coursesSeries.CoursesSeries;
import com.nhjf.model.system.User;

@SuppressWarnings("serial")
@Entity
@Table(name = "payMessage")
public class PayMessage extends BaseModel{
	/**
	 * 主键ID
	 */
	@Id
	@GeneratedValue(generator = "generator")
	@GenericGenerator(name = "generator", strategy = "native")
	@Column(name = "id", unique = true)
	private Long id;
	/**
	 * 账号id
	 */
	@OneToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "userId")
	private User user;
	/**
	 * 系列课id
	 */
	@OneToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "coursesSeriesId")
	private CoursesSeries coursesSeries;
	/**
	 * 支付类型
	 */
	@Column(name = "isPaySuccess")
	private Integer isPaySuccess;
	/**
	 * 返回信息
	 */
	@Column(name = "message")
	private String message;
	/**
	 * 创建时间
	 */
	@Column(name = "createTime")
	private String createTime;
	/**
	 * 金额
	 */
	@Column(name = "amount")
	private double amount;
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	public User getUser() {
		return user;
	}
	public void setUser(User user) {
		this.user = user;
	}
	public CoursesSeries getCoursesSeries() {
		return coursesSeries;
	}
	public void setCoursesSeries(CoursesSeries coursesSeries) {
		this.coursesSeries = coursesSeries;
	}
	public Integer getIsPaySuccess() {
		return isPaySuccess;
	}
	public void setIsPaySuccess(Integer isPaySuccess) {
		this.isPaySuccess = isPaySuccess;
	}
	public String getMessage() {
		return message;
	}
	public void setMessage(String message) {
		this.message = message;
	}
	public String getCreateTime() {
		return createTime;
	}
	public void setCreateTime(String createTime) {
		this.createTime = createTime;
	}
	public double getAmount() {
		return amount;
	}
	public void setAmount(double amount) {
		this.amount = amount;
	}
	
}
